#include<stdio.h>
#include<stdlib.h>
//------------------------------------------------------------------------------------
//数组转置

/*
int main(){
    int a[2][3] = {1,2,3,4,5,6};
    int b[3][2];
    int i = 0;
    int j = 0;
    for(i=0;i<=1;i++){
        for(j=0;j<=2;j++){
            b[j][i]=a[i][j];
        }
    }
    for(i=0;i<=2;i++){
        for(j=0;j<=1;j++){
            printf("b[%d][%d] = %d  ",i,j,b[i][j]);
        }
        printf("\n");
    }
}
*/

//-----------------------------------------------------------------------------------------
//输出上三角矩阵元素
/*  1 1 6
    0 5 7
    0 0 2
*/


/*
int main(){
    int arr[3][3]={1,1,6,0,5,7,0,0,2};
    int i,j;
    for(i=0;i<=2;i++){
        for(j=0;j<=2;j++){
            if(j>=i){
                printf("arr[%d][%d] = %d  ",i,j,arr[i][j]);
            }
        }
        printf("\n");
    }
}
*/

//-----------------------------------------------------------------------------
//求两个矩阵的和，不引入新的矩阵
/*
int main(){
    int a[3][3] = {1,2,3,4,5,6,7,8,9};
    int b[3][3] = {9,8,7,6,5,4,3,2,1};
    int i,j;
    for(i=0;i<=2;i++){
        for(j=0;j<=2;j++){
            b[i][j]+=a[i][j];
            printf("b[%d][%d] = %d  ",i,j,b[i][j]);
        }
        printf("\n");
    }
}
*/

//-------------------------------------------------------------------------------------
//最大最小元素的行和列

/*
int maximum(int a,int b){
    return (a>b?a:b);
}

int minimum(int a,int b){
    return (a<b?a:b);
}
int main(){
    // int i=4;
    // int j=3;
    // printf("%d",maximum(i,j));
    int arr[3][3] = {1,2,3,4,5,6,7,8,9};
    int max = arr[0][0];
    int min = arr[0][0];
    int i,j;
    for(i=0;i<=2;i++){
        for(j=0;j<=2;j++){

            max = maximum(arr[i][j],max);
            min = minimum(arr[i][j],min);
        }
    }
    for(i=0;i<=2;i++){
        for(j=0;j<=2;j++){
            if(arr[i][j] == max)
                printf("max value is in arr[%d][%d]\n",i,j);
        }
    }
    for(i=0;i<=2;i++){
        for(j=0;j<=2;j++){
            if(arr[i][j] == min)
                printf("min value is in arr[%d][%d]\n",i,j);
        }
    }
}

*/
//--------------------------------------------------------------------------------
//同行最大，同列最小

int main(){
    
}